#include<iostream>
#include<string.h>
using namespace std;
int main() {
    const int len = 1000;
    int num = 0, data = 0;
    int array[len];
    string str;
    str.length();
    while (cin >> num) {
        memset(array, 0, sizeof(array));
        while (num >= 0) {
            cin >> data;
            array[data]++;
            num--;
        }
        for (int i = 0; i < len; i++) {
            if (array[i] > 0)
                cout << i << endl;
        }
    }
    int x;
    cin >> x;
}